<?php
namespace App\Services\ThirdPayments\BankTraits;

use App\Lib\BankMap;

trait HFBBankMap
{
    private $bankMap = [
        BankMap::GONGSHANG       =>  '001',
        BankMap::JIANSHE         =>  '003',
        BankMap::CHINABANK       =>  '004',
        BankMap::ZHAOSHANG       =>  '002',
        BankMap::ZHONGXIN        =>  '009',
        BankMap::XINGYE          =>  '011',
        BankMap::GUANGDA         =>  '010',
        BankMap::NONGYE          =>  '005',
        BankMap::YOUZHEN         =>  '020',
        BankMap::SHENFA          =>  '0',
        BankMap::GUANGFA         =>  '008',
        BankMap::MINSHENG        =>  '013',
        BankMap::JIAOTONG        =>  '006',
        BankMap::ZHESHANG        =>  '044',
        BankMap::SHANGHAI        =>  '0',
        BankMap::NINGBO          =>  '024',
        BankMap::PUFA            =>  '007',
        BankMap::NANJING         =>  '0',
        BankMap::PINGAN          =>  '012',
    ];

    public function getBank($bankCode)
    {
        if (array_key_exists($bankCode, $this->bankMap)) return $this->bankMap[$bankCode];
        else return 0;
    }
}
